import Vue from "vue";
import VueRouter from "vue-router";
Vue.use(VueRouter);
import MyInfo from "@/views/MyInfo.vue";
import MyList from "@/views/MyList.vue";
import PassPord from "@/views/PassPord.vue";
import MyMine from "@/views/MyMine.vue";

import MyPage from "@/views/MyPage.vue";
import MyNews from "@/views/MyNews.vue";
import MySports from "@/views/MySports.vue";
import SportsPage from "@/views/SportsPage.vue";
import SportsInland from "@/views/SportsInland.vue";
import SportsForeign from "@/views/SportsForeign.vue";

const router = new VueRouter({
  routes: [
    { path: "/", redirect: "/myinfo" },
    { path: "/myinfo", component: MyInfo },
    { path: "/mylist", component: MyList },
    { path: "/mypord", component: PassPord },
    { path: "/mymine", component: MyMine },
    { path: "/mypage", component: MyPage },
    { path: "/mynews", component: MyNews },
    {
      path: "/mysports",
      component: MySports,
      children: [
        { path: "/sportspage", component: SportsPage },
        { path: "/sportinland", component: SportsInland },
        { path: "/sportsforeign", component: SportsForeign },
      ],
    },
  ],
});
export default router;
